<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
        content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no, viewport-fit=cover" />

    <!-- 测试 -->
    <meta http-equiv="content-security-policy" content="upgrade-insecure-requests">
    <!-- 测试结束 -->
    <meta content="yes" name="apple-mobile-web-app-capable" />

    <meta content="yes" name="apple-touch-fullscreen" />

    <meta content="telephone=no,email=no" name="format-detection" />
    <script src="https://oss.chathot.me/action/vue_component/requestload/requestload.js?v=3435635"></script>
    <script src="https://oss.chathot.me/action/js/loading.js?v=3435635"></script>
    <script src="https://oss.chathot.me/action/js/vue.min.js?v=3435635"></script>
    <script src="https://oss.chathot.me/action/mobile_js/mobile_until.js?v=3435635"></script>
    <script src="https://oss.chathot.me/action/mobile_js/mobile_request.js?v=0.234"></script>
    <script src="./js/request2.js?v=3435635"></script>
    <script src="./js/https.js?v=3435635"></script>
    <link rel='stylesheet' href="https://oss.chathot.me/action/mobile_js/var.css?v=3435635">
    <script src="js/lan.js?v=3435635"></script>
    <link rel="stylesheet" href="./css/page.css?v=3435635">
    <script src="https://oss.chathot.me/action/vue_component/mark_box/mark_box.js?v=33654.2"></script>
    <script>
        var vueObj = [];

        function handleMedia(url) {
            console.log('打印传递过来的url 6666', url);
            console.log('123', url.split('.').reverse()[0] == 'mp4');

            // if(url.split('.').reverse()[0]=='mp4'){
            //     vueObj.videStr=url   
            // }
            // else{
            // }
            vueObj.imgStr = url
        }
    </script>
</head>

<body>
    <!-- <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.3.4/vconsole.min.js"></script>
    <script>
        // init vConsole
        var vConsole = new VConsole();
    </script> -->
    <div id="page">
        <div>  
           <!-- yuyan: {{lan}} -->
        </div>
        <div class="top">
            <img :src="lan.top" alt="">
        </div>
        <div class="aMonster">
            <ul>
                <li :class="{'active':tabT==1}" @click='changeTab(1)' class="tabone">
                    {{lan.a0}}
                </li>
                <li :class="{'actives':tabT==2}" @click='changeTab(2)' class="tabtwo">

                    {{lan.a1}}
                </li>
            </ul>
        </div>
        <div v-if='tabT==2'>
            <div class="titlet">
                {{lan.a22}}
            </div>
            <div class="contents">
                <div style="margin-left :0.2rem; margin-top: .5rem; margin-bottom: .2rem;">

                    {{lan.a23}}


                </div>
                <div class="bjone"><img style="    width: 6.6rem;
                        margin-left: 0.15rem;"
                        src="https://starvoice.oss-cn-shenzhen.aliyuncs.com/action/halloweenDirectory/activitiesToSupport1/bj1.png"
                        alt=""></div>

                <div style="margin-left: .2rem; ;margin-top: .2rem; margin-bottom: .2rem;">
                    {{lan.a24}}
                </div>
                <div class="bjone"><img style="    width: 6.6rem;
                    margin-left: 0.15rem;"
                        src="https://starvoice.oss-cn-shenzhen.aliyuncs.com/action/halloweenDirectory/activitiesToSupport1/bj2.png"
                        alt=""></div>

                <div style="margin-left: .2rem; ;margin-top: .2rem; margin-bottom: .2rem;">
                    {{lan.a25}}
                </div>
                <div class="bjone"><img style="    width: 6.6rem;
                    margin-left: 0.15rem;"
                        src="https://starvoice.oss-cn-shenzhen.aliyuncs.com/action/halloweenDirectory/activitiesToSupport1/bj3.png"
                        alt=""> </div>

                <div style="margin-left: .2rem; ;margin-top: .2rem; margin-bottom: .2rem;">
                    {{lan.a26}}
                </div>
                <div class="bjone"><img style="    width: 6.6rem;
                    margin-left: 0.15rem;"
                        src="https://starvoice.oss-cn-shenzhen.aliyuncs.com/action/halloweenDirectory/activitiesToSupport1/bj4.png"
                        alt=""></div>
            </div>
            <div class="contents" style="margin-left: .2rem; ;margin-top: .8rem; ">
                <div class="titlets"> {{lan.a27}}</div>
                <div class="avctions">
                    <div v-for="(item,index) in roomlist" @click="setTxt(item)">

                        <img :src="item.avatar" alt="">
                        <p style="	color: #ffd057;"> {{item.tit}}</p>
                    </div>
                </div>
                <div class="atxt">
                    {{lan.a34}}
                </div>

            </div>
        </div>
        <div class="mt_4" v-if='tabT==1'>
            <!-- 活动扶持开始  其他先不用 -->
            <div class="support-box content mt68 padding_none"
                v-if="(activeData.is_admin == 1 || activeData.creater == user_id) && appActiceId">
                <div :style="{
                        'font-size': currentLan === 'id' && '0.28rem',
                    }" class="title">{{lan.a2}}</div>
                <div class="active-content">
                    <div class="avctive-bac">
                        <div class="active-content-img">
                            <img v-if="activeData.url" :src="activeData.url" alt="">
                            <div class="active-num" style="border-radius: 0.28rem;
                                height: 0.56rem;">
                                <img class="active-icon"
                                    src="https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/active-num.png"
                                    alt="">
                                <span class="active-num-text">{{ activeData.number }}</span>
                            </div>
                            <div class="active-num" style="border-radius: 0.28rem;
                               left: 0.2rem;
        width: 2.28rem;
        height: 0.56rem;">
                                <img class="active-icon"
                                    src="https://starvoice.oss-cn-shenzhen.aliyuncs.com/action/halloweenDirectory/activitiesToSupport1/room1.png"
                                    alt="">
                                <span class="active-num-text">ID{{activeData.room_number}}</span>
                            </div>
                            <div class="active-text">
                                <p class="active-text-title" style="font-size: .26rem;">{{ activeData.title }}</p>
                                <p style="  color: rgba(255, 255, 255, 0.6);">{{ activeData.content }}</p>
                            </div>
                        </div>
                    </div>
                    <div class="support-info">
                        <div class="support" style="margin-left: .2rem;">{{ activeData.count }} {{ lan.k33 }}</div>
                        <div class="golds" style="margin-right: .2rem;">
                            <img class="gold-icon"
                                src="https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/icon-room-rank.png"
                                alt="">
                            <span class="gold-text">{{ activeData.total_gold }}</span>
                        </div>

                    </div>
                    <!-- top 3 的头像 -->
                    <div class="textbac">
                        <div style="    padding-top: 0.2rem; margin-left: .2rem;">
                            <div>{{lan.a6}}</div>
                            <div>{{lan.a7}}</div>
                            <div>{{lan.a8}}</div>
                        </div>
                    </div>
                    <div class="btn-bc" :style="{
                            'filter': (activeData.apply_status == 1 || activeData.apply_status == 4) ? 'grayscale(1)' : 'none',
                        }" @click="supportBtnClick">
                        <span v-if="activeData.apply_status == 1">{{ lan.k50 }}</span>
                        <span v-else-if="activeData.apply_status == 3">{{ lan.k51 }}</span>
                        <span v-else-if="activeData.apply_status == 4">{{ lan.k54 }}</span>
                        <span v-else>{{ lan.k27 }}</span>
                    </div>

                </div>
            </div>
            <div class="content mt68">
                <div class="title">{{lan.a10}}</div>


                <div style="margin-top: .2rem;">{{ lan.a11 }}</div>
                <div>{{ lan.a12 }}</div>
                <div>{{ lan.a13 }}</div>
                <div>{{ lan.a14 }}</div>
            </div>
            <!-- 活动扶持开始结束 -->
            <div class="content mt68 padding_none">
                <div :style="{
                        'font-size': currentLan === 'id' && '0.28rem',
                    }" class="title">{{lan.a10}}</div>
                <div class="atxt" style="margin-top: .2rem;">
                    {{lan.a16}}
                </div>
                <div v-if="currentLan === 'id'" class="table_box m-1">
                    <img src="https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-img2.png" alt="">
                </div>
                <div class="table_box m-1">
                    <img src="https://oss.chathot.me/action/2021/08/13/p1.png" alt="">
                </div>

                  <div class="table_box ">
                    <table border="1" cellspacing="0">
                        <tr>
                            <th>    {{lan.a17}}</th>
                            <th>    {{lan.a18}}</th>
                            <th>    {{lan.a19}}</th>
                            <th>    {{lan.a20}}</th>
                        </tr>
                        <tr v-for="(item,index) in list">
                            <td v-for="ite in item" v-if="!Array.isArray(ite)">{{ite}}</td>
                            <td v-for="ite in item" v-if="Array.isArray(ite)">
                                <div class="gift">
                                    <div v-for="(ie,inx) in ite">
                                        <img :src="ie.type==1?'https://oss.chathot.me/action/2021/08/13/p3.png': ie.type== 2 ? 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/broadcast-card.png?v=2' :'https://oss.chathot.me/action/2021/08/13/p4.png'"
                                            alt="">
                                        <!-- <p> {{inx==0?lan.a34:''}}</p> -->
                                        <p>
                                            <span v-if="ie.type!=1">{{ie.value}}</span>
                                            <span
                                                v-html="ie.type==1 ? lan.a52.replace('lzTemplate', ie.value) : ''"></span>
                                        </p>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    </table>

                </div>

                <!-- <div class="content mt2 icon_box">

                <div class="user mt3">
                    <div v-for="item in user_list">
                        <div class="user_img" @click="roomDetails(item.id, item.idText)">
                            <img :src="item.img" alt="">
                        </div>
                        <p class="m1 t_">{{item.no}}</p>
                        <p>{{item.t}}</p>
                    </div>
                </div>

                <div class="mt4">
                    <p>{{lan.a26}}</p>
                    <p>{{lan.a26_1}}</p>
                    <p>{{lan.a26_2}}</p>
                    <p>{{lan.a26_3}}</p>
                </div>


            </div> -->


            </div>


            <!--提示弹出-->
         
            <!-- 活动扶持开始 活动弹窗 -->
            <markbox v-if="supportMark && appActiceId">
                <div class="support-content" slot="markMsg" id="support-content" @click="supportMarkClick">
                    <div class="content" slot="markMsg">
                        <div class="title">{{lan.a35}}</div>
                        <div class="support-content-info">
                            <div class="tanc-text">
                                <div class="tanc-dj"> <img
                                        src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/dj.png"
                                        alt=""></div>
                                <div class="tamc-t">{{lan.a36}}</div>
                                <div class="tanc-im" v-if="handleLevelType()=='A'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/A.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='B'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/B.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='C'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/C.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='D'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/D.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='E'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/E.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='F'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/F.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='G'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/G.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='H'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/H.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='I'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/I.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='J'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/J.png"
                                        alt="">


                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='K'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/K.png"
                                        alt="">
                                    <!-- <span>({{ lan.k35 }}: {{ planItem[0] && planItem[0].selfPrice }}) {{lan.a4}}</span> -->

                                </div>
                                <div class="tanc-im" v-else-if="handleLevelType()=='L'">

                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/L.png"
                                        alt="">


                                </div>
                            </div>
                            <div class="tanc-text">
                                <div class="tanc-dj"> <img
                                        src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/jl.png"
                                        alt=""></div>
                                <div class="tamc-t">{{lan.a38}}</div>
                            </div>
                            <div class="reward-box">
                                <div
                                    v-for="(planItem, planIndex) in activeData.plan_info"
                                    :key="planIndex"
                                    class="reward-item">
                                    <div
                                        @click="rewardItemClick(planIndex)"
                                        class="reward-circle-box">
                                        <div
                                            :style="{
                                                'background-image': rewardSelect === planIndex ? 'url(https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/select-circle.png)' : 'url(https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/no-select-circle.png)'
                                            }"
                                            class="reward-circle"></div>
                                        <div class="reward-title">
                                            <span>{{ lan.a39 }} {{ planIndex+ 1==1?A:planIndex+1==2?B:planIndex+1==3?C:planIndex+1==4?D:planIndex+1==5?E:planIndex+1==6?F:planIndex+1==7?G:planIndex+1==8?H:planIndex+1==9?I:planIndex+1==10?J:planIndex+1==11?K:L }}</span>
                                        </div>
                                    </div>
                                    <div class="reward-content">
                                     
                                        <div class="reward-content-text">
                                            <div class="reward-content-award">
                                                <div
                                                   
                                                    v-for="(planChildItem, planChildIndex) in planItem"
                                                    :key="planChildIndex"
                                                    class="reward-content-award-item">
                                                    <span>{{ planChildItem.gift_name }}</span>
                                                    <span>*</span>
                                                    <span>{{ planChildItem.gift_num }}</span>
                                                    <span>; </span>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>                                               
                            </div>

                            <!-- 旧版 -->
                            <div class="reward-box" v-if="activeData.client_version<60500">
                                <p class="upload-title">{{ lan.k55 }}</p>
                                <p class="upload-sub-title">{{ lan.k56 }}</p>
                                <label v-show="!videoPath" for="upload-ipt" class="upload-content" style="width: auto;">
                                    <input ref="uploadIpt" @change="fileChange($event)" accept="image/*"
                                        class="upload-file-ipt" id="upload-ipt" type="file">
                                    <label class="upload-ipt-img" for="upload-ipt">
                                        <img class="add-icon"
                                            src="https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/add-icon.png"
                                            alt="">
                                    </label>
                                </label>
                                <div class="video-box" v-show="videoPath">
                                    <div @click="deleteVideo" class="delete-video" style="margin-left: 3.9rem;"></div>
                                    <!-- <video :src="videoPath" class="video-show" preload id="video-el" controls="controls"></video> -->
                                    <image :src="videoPath" class="video-show" id="video-el" style="    margin: 0.3rem auto 0;
                              
                                max-width: 80%;
                                width: auto;
                                max-height: 2rem;
                            
                                background-color: rgba(0, 0, 0, 0.5);
                                display: block;" />
                                </div>
                                <p class="award-warn">{{ lan.k31 }}</p>
                                <div @click="submitClick" class="submit-btn">{{lan.a9}}</div>
                            </div>
                            <!-- 新版 -->
                            <div class="reward-box" v-else>
                                <div class="upload-im">
                                    <img src="https://oss.chathot.me/action/halloweenDirectory/activitiesToSupport1/jietu.png"
                                        alt="">
                                    <p class="upload-title">{{ lan.a40 }}</p>
                                </div>
                                <p class="upload-sub-title">{{ lan.a41 }}</p>

                                <div class="reward-box">
                                    <div v-for="(item8,index) in type" :key="index" class="reward-item">
                                        <div @click="typeClick(index)" class="reward-circle-box">
                                            <div :style="{
                                            'background-image': typeab === index ? 'url(https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/select-circle.png)' : 'url(https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/no-select-circle.png)'
                                        }" class="reward-circle"></div>
                                            <div style="margin-left: .2rem;">{{item8.typeA}}</div>

                                        </div>

                                    </div>
                                </div>
                                <div v-show='typeab==0'>
                                    <div class="video-box">
                                        <!-- <div @click="deleteVideo" class="delete-video"></div> -->
                                        <!-- <video :src="videoPath" class="video-show" preload id="video-el" controls="controls"></video> -->
                                        <!-- <image :src="videoPath" class="video-show" id="video-el" /> -->
                                    </div>
                                    <div class="upload-content" style="width: auto;" v-if="videStr==''">
                                        <div class="upload-ipt-img">
                                            <img class="add-icon" @click='selectMedia(1)'
                                                src="https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/add-icon.png"
                                                alt="">

                                        </div>
                                    </div>
                                    <!-- <div   v-if="videStr!=''"  style="width: auto; position: relative;   width: 2.02rem; 
                                height: 1.32rem;" >
                                    <div class="upload-ipt-img" >
                                       <img :src="videStr" alt="">
                                    </div>
                                </div> -->
                                    <div class="video-box" v-if="videStr!=''">
                                        <div @click="changeVideStr" class="delete-video" style="margin-left: 4.2rem;">
                                        </div>
                                        <!-- <video :src="videoPath" class="video-show" preload id="video-el" controls="controls"></video> -->
                                        <video :src="videStr" class="video-show" id="video-el" controls
                                            :poster='videStr' style="    margin: 0.3rem auto 0;
                            width: 3rem;
                                  height: 1.6rem;
                                
                                
                                    background-color: rgba(0, 0, 0, 0.5);
                                    display: block;"></video>
                                    </div>
                                </div>
                                <div style="display: flex;" v-show='typeab==1'>
                                    <!-- <div class="video-box"> -->
                                    <!-- <div @click="deleteVideo" class="delete-video"></div> -->
                                    <!-- <video :src="videoPath" class="video-show" preload id="video-el" controls="controls"></video> -->
                                    <!-- <image :src="videoPath" class="video-show" id="video-el" /> -->
                                    <!-- </div> -->
                                    <div style="position: relative; margin-top: 0.2rem" v-show="imgUrl.length!==0">

                                        <div style="display: flex; ">
                                            <div v-for='(item,index) in imgUrl' :key='index'
                                                style="margin-right: .1rem;">
                                                <img :src="item" alt="" style="    width: 2.02rem;
                                            height: 1.32rem">
                                                <div @click="closeImage(index)" class="delete-video"></div>
                                            </div>
                                        </div>
                                        <!-- <img :src="videoUrl" class="video-show" controls="controls"></img> -->

                                    </div>
                                    <div class="upload-content" v-show='imgUrl.length<=2'>
                                        <div class="upload-ipt-img">
                                            <img class="add-icon" @click='selectMedia(2)'
                                                src="https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/add-icon.png"
                                                alt="">
                                        </div>
                                    </div>

                                </div>

                                <p class="award-warn">{{ lan.k31 }}</p>
                                <div @click="submitChange " class="submit-btn">{{lan.a9}}</div>
                            </div>

                        </div>
                    </div>
                </div>
            </markbox>
            <!-- 不符合规则的弹窗  阿语英语-->
            <markbox v-if="enarRuleMark && appActiceId">
                <div class="support-content" slot="markMsg" id="rule-content">
                    <div class="content" slot="markMsg">
                        <div class="title">{{lan.k42}}</div>
                        <div class="support-content-info">
                            <p class="award-warn">{{ lan.k44 }}</p>
                            <p class="award-warn">{{ lan.k45.replace('lztemplate', 2) }}</p>
                            <p class="award-warn">{{ lan.k46 }} 10</p>
                            <p class="award-warn">{{ lan.k47 }} 20</p>
                            <p class="award-warn">{{ lan.k48 }} 80000</p>
                            <div @click="enarRuleMark = false;" :style="{
                                'background-image': 'url(https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/light-btn-bg.png)'
                            }" class="submit-btn">{{ lan.k43 }}</div>
                        </div>
                    </div>
                </div>
            </markbox>
            <!-- 不符合规则的弹窗 土耳其印地印尼 -->
            <markbox v-if="trHiIdRuleMark && appActiceId">
                <div class="support-content" slot="markMsg" id="rule-content">
                    <div class="content" slot="markMsg">
                        <div class="title">{{lan.k42}}</div>
                        <div class="support-content-info">
                            <p class="award-warn">{{ lan.k44 }}</p>
                            <p class="award-warn">{{ lan.k45.replace('lztemplate', 2) }}</p>
                            <p class="award-warn">{{ lan.k46 }} 10</p>
                            <p class="award-warn">{{ lan.k47 }} 10</p>
                            <p class="award-warn">{{ lan.k48 }} 50000</p>
                            <div @click="trHiIdRuleMark = false;" :style="{
                                'background-image': 'url(https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/light-btn-bg.png)'
                            }" class="submit-btn">{{ lan.k43 }}</div>
                        </div>
                    </div>
                </div>
            </markbox>
            <!-- 活动扶持开始结束 活动弹窗结束 -->
        </div>
        <markbox v-if="isRule">
            <div class="mark_box" slot="markMsg" @click="isRule=false">
                <div class="roomMsg">
                    <div class="r_img">
                        <img style="border-radius: 0.2rem" :src="showMsg.b" alt="">
                    </div>
                    <div class="mt3">
                        <div class="r_T">
                            {{showMsg.tit}}
                        </div>
                        <div class="r_txt mt2">
                            <p v-for="ite in showMsg.x">{{ite}}</p>
                            <p>{{showMsg.t}}</p>
                            <p>{{showMsg.r}}</p>

                        </div>
                    </div>

                    <div class="goRoom">
                        <div></div>
                        <div class="sr">
                            <img src="https://oss.chathot.me/action/2021/08/13/t5.png" alt="">
                        </div>

                    </div>
                    <div @click="istop=isRule" class="colse">

                    </div>

                </div>

            </div>
        </markbox>
        <div class="footer">
            {{ lan.k24 }}
        </div>

        <!-- <script>
        if (GetUrlParam('language') == 'ar') {
            document.getElementsByTagName('body')[0].className = 'ar_text'

        }
        console.log(GetUrlParam('token'), GetUrlParam('user_id'), '活动id' ,GetUrlParam('activity_id'), window.location, '---------------')
        new Vue({
            el: '#page',
            data: function () {
                return {
                    isRule: false,
                    lan: {},
                    list: [],
                    user_list: [],
                    roomlist: [],
                    showMsg: {},

                    currentLan: 'hi', // tr id hi
                    // 活动扶持开始
                    supportMark: false,
                    rewardSelect: 0, // 奖励选择
                    videoPath: '',
                    form: {
                        file: '',
                    },
                    activeId: GetUrlParam('activity_id') || '',
                    appActiceId: GetUrlParam('activity_id') || '',
                    activeData: {
                        con_list: [],
                        plan_info: [],
                    },
                    enarRuleMark: false,
                    trHiIdRuleMark: false,
                    videoUploadUrl: '', // 添加
                    // 活动扶持开始结束
                }
            },
            created: function () {
                console.log(GetUrlParam('token'), GetUrlParam('user_id'), '活动id' ,GetUrlParam('activity_id'), '---------------')
                var lan = this.lan = judge_lan(this.currentLan, language);
                document.title = lan.a0;
                // type 1 礼物 2 广播卡 3 置顶卡
                if (this.currentLan === 'tr') {
                    this.user_list = [
                        {
                            img: 'https://oss.chathot.me/action/2021/07/20/img1.png',
                            no: '10020',
                            id: '451892',
                            idText: 'chinese451892',
                            t: '',
                        },
                        {
                            img: 'https://oss.chathot.me/action/2021/07/20/img1.png',
                            no: '10022',
                            id: '47826',
                            idText: 'chinese47826',
                            t: '',
                        },
                    ];
                    
                    this.list = [
                        [100, 10, 50000, [{
                            type: 1,
                            value: 4000,
                        }, {
                            type: 2,
                            value: '*2',
                        }]],
                        [200, 15, 100000, [{
                            type: 1,
                            value: 8000,
                        }, {
                            type: 2,
                            value: '*4',
                        }]],
                        [400, 20, 200000, [{
                            type: 1,
                            value: 16000,
                        }, {
                            type: 2,
                            value: '*6',
                        }]],
                        [600, 25, 300000, [{
                            type: 1,
                            value: 24000,
                        }, {
                            type: 2,
                            value: '*2',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                        [800, 25, 400000, [{
                            type: 1,
                            value: 32000,
                        }, {
                            type: 2,
                            value: '*4',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                        [1000, 30, 500000, [{
                            type: 1,
                            value: 40000,
                        }, {
                            type: 2,
                            value: '*6',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                    ];
           
               
                } else if (this.currentLan === 'id') {
                    this.user_list = [
                        {
                            img: 'https://oss.chathot.me/action/2021/07/20/img1.png',
                            no: '10051',
                            id: '13164',
                            idText: 'chinese13164',
                            t: '',
                        },
                    ];
                         
                    this.list = [
                        [100, 10, 50000, [{
                            type: 1,
                            value: 4000,
                        }, {
                            type: 2,
                            value: '*2',
                        }]],
                        [200, 15, 100000, [{
                            type: 1,
                            value: 8000,
                        }, {
                            type: 2,
                            value: '*4',
                        }]],
                        [400, 20, 200000, [{
                            type: 1,
                            value: 16000,
                        }, {
                            type: 2,
                            value: '*6',
                        }]],
                        [600, 25, 300000, [{
                            type: 1,
                            value: 24000,
                        }, {
                            type: 2,
                            value: '*2',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                        [800, 25, 400000, [{
                            type: 1,
                            value: 32000,
                        }, {
                            type: 2,
                            value: '*4',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                        [1000, 30, 500000, [{
                            type: 1,
                            value: 40000,
                        }, {
                            type: 2,
                            value: '*6',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                    ];
           

                } else if (this.currentLan === 'hi') {
                    this.user_list = [
                        {
                            img: 'https://oss.chathot.me/action/2021/07/20/img1.png',
                            no: '10072',
                            id: '644254',
                            idText: 'chinese644254',
                            t: '',
                        },
                    ];
                    this.list = [
                        [100, 10, 50000, [{
                            type: 1,
                            value: 4000,
                        }, {
                            type: 2,
                            value: '*2',
                        }]],
                        [200, 15, 100000, [{
                            type: 1,
                            value: 8000,
                        }, {
                            type: 2,
                            value: '*4',
                        }]],
                        [400, 20, 200000, [{
                            type: 1,
                            value: 16000,
                        }, {
                            type: 2,
                            value: '*6',
                        }]],
                        [600, 25, 300000, [{
                            type: 1,
                            value: 24000,
                        }, {
                            type: 2,
                            value: '*2',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                        [800, 25, 400000, [{
                            type: 1,
                            value: 32000,
                        }, {
                            type: 2,
                            value: '*4',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                        [1000, 30, 500000, [{
                            type: 1,
                            value: 40000,
                        }, {
                            type: 2,
                            value: '*6',
                        }, {
                            type: 3,
                            value: '*1',
                        }]],
                    ];
           
                }

                this.roomlist = [
                    {
                        avatar: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path1-s-' + this.currentLan + '.png?v=4',
                        b: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path1-b-' + this.currentLan + '.png',
                        tit: lan.k0,
                        // x: [lan.k6,lan.k6_1,lan.k6_2,lan.k6_3,lan.k6_4,lan.k6_5,lan.k6_6],
                        x: [lan.k6],
                        t: lan.k12,
                        r: lan.k18,
                    },
                    {
                        avatar: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path2-s-' + this.currentLan + '.png?v=4',
                        b: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path2-b-' + this.currentLan + '.png',

                        tit: lan.k1,
                        x: [lan.k7],
                        t: lan.k13,
                        r: lan.k19,
                    },
                    {
                        avatar: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path3-s-' + this.currentLan + '.png',
                        b: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path3-b-' + this.currentLan + '.png',

                        tit: lan.k2,
                        x: [lan.k8],
                        t: lan.k14,
                        r: lan.k20,
                    },
                    {
                        avatar: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path4-s-' + this.currentLan + '.png',
                        b: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path4-b-' + this.currentLan + '.png',

                        tit: lan.k3,
                        x: [lan.k9],
                        t: lan.k15,
                        r: lan.k21,
                    },
                    {
                        avatar: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path5-s-' + this.currentLan + '.png',
                        b: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path5-b-' + this.currentLan + '.png',

                        tit: lan.k4,
                        x: [lan.k10],
                        t: lan.k16,
                        r: lan.k22,
                    },
                    {
                        avatar: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path6-s-' + this.currentLan + '.png?v=2',
                        b: 'https://oss.chathot.me/action/activityhtml/roomActivityInHiTr/page-path6-b-' + this.currentLan + '.png?v=2',

                        tit: lan.k5,
                        x: [lan.k11],
                        t: lan.k17,
                        r: lan.k23,
                    },
                ]
                // 图片预加载
                for (var imgIndex = 0; imgIndex < this.roomlist.length; imgIndex++) {
                    var imgItem = this.roomlist[imgIndex];
                    var oImage = new Image();
                    oImage.src = imgItem.b;
                }

                // 请求活动详情
                // 活动扶持开始
                if (this.activeId) {
                    this.getData();
                }
                this.extData = {
                    supportLevel: {
                        arEn: [
                            {
                                type: 'A',
                                num: 10,
                                gold: 80000,
                            },
                            {
                                type: 'B',
                                num: 15,
                                gold: 125000,
                            },
                            {
                                type: 'C',
                                num: 15,
                                gold: 250000,
                            },
                            {
                                type: 'D',
                                num: 20,
                                gold: 375000,
                            },
                            {
                                type: 'E',
                                num: 25,
                                gold: 625000,
                            },
                            {
                                type: 'F',
                                num: 25,
                                gold: 750000,
                            },
                            {
                                type: 'G',
                                num: 30,
                                gold: 875000,
                            },
                            {
                                type: 'H',
                                num: 35,
                                gold: 1000000,
                            },
                            {
                                type: 'I',
                                num: 40,
                                gold: 1250000,
                            },
                            {
                                type: 'J',
                                num: 40,
                                gold: 1750000,
                            },
                            {
                                type: 'K',
                                num: 40,
                                gold: 2500000,
                            },
                            {
                                type: 'L',
                                num: 40,
                                gold: 3750000,
                            },
                        ],
                        trHiId: [
                            {
                                type: 'A',
                                num: 10,
                                gold: 50000,
                            },
                            {
                                type: 'B',
                                num: 15,
                                gold: 100000,
                            },
                            {
                                type: 'C',
                                num: 20,
                                gold: 200000,
                            },
                            {
                                type: 'D',
                                num: 25,
                                gold: 300000,
                            },
                            {
                                type: 'E',
                                num: 25,
                                gold: 400000,
                            },
                            {
                                type: 'F',
                                num: 30,
                                gold: 500000,
                            },                                                                                                                                            
                        ],
                    },
                };                
                // 活动扶持开始结束
            },
            methods: {
                setTxt: function(msg) {
                    this.showMsg = msg;
                    this.isRule = true
                },
                // 跳转个人主页
                go_user: function(id) {
                    userDetails(id);

                },
                // 房间跳转
                roomDetails: function(id, idText) {
                    // roomDetails('451334', '', 'chinese451334')
                    console.log(id, '', idText);
                    roomDetails(id, '', idText)

                },
                // 活动扶持开始
                supportMarkClick: function(e) {
                    if (e.target.id == 'support-content') {
                        this.supportMark = false;
                    }
                },
                fileChange: function(e) {
                    const files = e.target.files;
                    const filesItem = files[0];
                    if (!filesItem) return;
                    const maxSize = 50 * 1024 * 1024;
                    if (filesItem.size > maxSize) {
                        toast(this.lan.k30);
                        return;
                    }
                    console.log(filesItem.size, '打印size')
                    console.log('打印size123')
                    this.form.file = filesItem;
                    var objUrl = this.getObjectURL(filesItem);
                    if (objUrl) {
                        this.videoPath = objUrl;
                    }
                },
                //建立一个可存取到该file的url
                getObjectURL: function(file) {
                    var url = null ;
                    if (window.createObjectURL != undefined) { // basic
                        url = window.createObjectURL(file) ;
                    } else if (window.URL != undefined) { // mozilla(firefox)
                        url = window.URL.createObjectURL(file) ;
                    } else if (window.webkitURL != undefined) { // webkit or chrome
                        url = window.webkitURL.createObjectURL(file) ;
                    }
                    return url ;
                },
                removeObjectURL: function(ObjectFile) {
                    var url = null ;
                    if (window.revokeObjectURL != undefined) { // basic
                        url = window.revokeObjectURL(ObjectFile) ;
                    } else if (window.URL != undefined) { // mozilla(firefox)
                        url = window.URL.revokeObjectURL(ObjectFile) ;
                    } else if (window.webkitURL != undefined) { // webkit or chrome
                        url = window.webkitURL.revokeObjectURL(ObjectFile) ;
                    }
                    return url ;
                },
                deleteVideo: function() {
                    this.videoPath = '';
                    this.videoUploadUrl = '';
                    this.form.file = '';
                    if (this.$refs.uploadIpt) {
                        this.$refs.uploadIpt.value = '';
                    }
                    this.removeObjectURL(this.videoPath);
                },
                uploadVideo: function() {
                    if (!this.form.file) {
                        toast(this.lan.k53);
                        return;
                    }
                    const query = {
                        user_token: GetUrlParam('token'),
                        user_id: GetUrlParam('user_id'),
                        file: this.form.file,
                    };
                    createLoad();
                    return ajax2(
                        "POST",
                        query,
                        {
                            hideLoading: false,
                            formDataFlag: true,
                        },
                        '/api/Video/upVideo',
                    ).then((res) => {
                        removeLoad();
                        console.log(res);
                        res.data = res.data || {};
                        this.videoUploadUrl = res.data.url;
                        return res.data;
                    }).catch(err => {
                        removeLoad();
                    });
                },
                submitClick: function() {

                    if (this.videoUploadUrl) {
                        this.handleUpload();
                    } else {
                        const uploadThen = this.uploadVideo()
                        if (!uploadThen) {
                            return;
                        }
                        uploadThen.then(res => {
                            this.handleUpload();
                        })
                    }
                },
                handleUpload: function() {
                    if (!this.videoUploadUrl) {
                        return toast(this.lan.k53);
                    }
                    const selectItem = this.activeData.plan_info[this.rewardSelect];
                    console.log(selectItem, this.rewardSelect, this.activeData.plan_info)
                    if (!selectItem || !selectItem[0] || !selectItem[0].plan_id) {
                        return;
                    }
                    createLoad();
                    var sureData = {
                        "Api_name": 'activity_support',
                        "Api_data": JSON.stringify({
                            "video_url": this.videoUploadUrl,
                            "token": GetUrlParam('token'),
                            "op":"room_sup_apply",
                            "activity_id": this.activeId,
                            "plan_id": selectItem[0].plan_id,
                            "user_id": GetUrlParam('user_id'),
                        })
                    }
                    console.log(sureData);
                    return ajax('POST', API.api_request, sureData).then(res => {  
                        removeLoad();
                        if (res.status == 200) {
                            toast(this.lan.k49);
                            this.supportMark = false;
                            this.getData();
                        } else {
                            toast('Fail, ' + res.status);
                        }
                    }).catch(err => {
                    });
                },
                
                getData: function() {
                    createLoad();
                    var sureData = {
                        "Api_name": 'activity_support',
                        "Api_data": JSON.stringify({
                            "token": GetUrlParam('token'),
                            "op": "get_room_active_info",
                            "activity_id": this.activeId,
                            "user_id": GetUrlParam('user_id'),
                        })
                    }                
                    return ajax('POST', API.api_request, sureData).then(res => {
                        console.log(res);
                        removeLoad();
                        res.data = res.data || {};
                        res.data.con_list = res.data.con_list || [];
                        res.data.plan_info = res.data.plan_info || [];
                        console.log(res.data);

                        const typeStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
                        const resultType = [];


                        for(let i = 0; i < res.data.plan_info.length; i++) {
                            let selfPrice = 0;
                            const planItem = res.data.plan_info[i];
                            for(let j = 0; j < planItem.length; j++) {
                                selfPrice = selfPrice * 1 + res.data.plan_info[i][j].gold_price * 1;
                            }
                            res.data.plan_info[i][0].selfPrice = selfPrice;
                        }
                        this.activeData = res.data;

                        const levelType = this.handleLevelType();
                        if (!levelType) {
                            this.activeData.plan_info = [];
                        } else {
                            for(let i = 0; i < res.data.plan_info.length; i++) {
                                const planItem = res.data.plan_info[i];
                                if (planItem[0] && planItem[0].level == (typeStr.indexOf(levelType) + 1)) {
                                    resultType.push(planItem);
                                }
                            }
                            this.activeData.plan_info = resultType;
                        }
                            
                        if (res.status == 200) {};
                    }).catch(err => {
                        removeLoad();
                    });
                },
                supportBtnClick: function() {
                    // 已经申请了这个了
                    if (this.activeData.apply_status == 1 || this.activeData.apply_status == 3 || this.activeData.apply_status == 4) return;
                    // 是否在活动结束后的七天内
                    const endTime = this.activeData.end_time;
                    const nowTime = this.activeData.now_time;
                    // 超过七天 或 活动还没结束
                    if (nowTime - endTime >= 3600 * 24 * 7 || nowTime - endTime < 0) {
                        toast(this.lan.k40);
                        return;
                    }
                    // 当前房间 该房间有待发扶持 即已经申请过了还在审批，然后又申请了一次
                    if (this.activeData.room_status == 1) {
                        toast(this.lan.k41);
                        return;
                    }
                    // 此房间当前是否有其他活动正在申请扶持
                    if (this.activeData.week_count > 2 && (this.activeData.apply_status == 1 || this.activeData.apply_status == 3)) {
                        toast(this.lan.k41);
                        return;
                    }
                    // 每个区的固定规则
                    if (this.currentLan === 'tr' || this.currentLan === 'id' || this.currentLan === 'hi') {
                        if (!(this.activeData.week_count < 2 && this.activeData.count >= 10 && this.activeData.number >= 10 && this.activeData.total_gold >= 50000)) {
                            // 弹窗
                            this.trHiIdRuleMark = true;
                            return;
                        }
                    } else {
                        if (!(this.activeData.week_count < 2 && this.activeData.count >= 10 && this.activeData.number >= 20 && this.activeData.total_gold >= 80000)) {
                            // 弹窗
                            this.enarRuleMark = true;
                            return;
                        }
                    }
                    this.supportMark = true;
                },       
                handleLevelType: function() {
                    const count = this.activeData.count;
                    const total_gold = this.activeData.total_gold;
                    let awardArr = [];
                    if (this.currentLan === 'tr' || this.currentLan === 'id' || this.currentLan === 'hi') {
                        awardArr = this.extData.supportLevel.trHiId;
                    } else {
                        awardArr = this.extData.supportLevel.arEn;
                    }
                    for(let i = awardArr.length - 1; i >= 0; i--) {
                        const item = awardArr[i];
                        if (count >= item.num && total_gold >= item.gold) {
                            return item.type;
                        }
                    }
                    return '';
                },
                rewardItemClick: function(index) {
                    this.rewardSelect = index;
                },
                // 活动扶持开始结束
            },
            mounted: function () {
                var height = document.documentElement.clientHeight || document.body.clientHeight;
                var page = document.querySelector('#page');
                page.style.minHeight = height + 'px';
            }

        })

    </script> -->
        <script src="./js/index.js?v=3435635"></script>
</body>

</html>